package com.cubetest;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import com.cubetest.R;

public class ScoreActivity extends Activity implements OnClickListener {
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		Button newGame = (Button) findViewById(R.id.bNew);
		Button exit = (Button) findViewById(R.id.bExit);
		newGame.setOnClickListener(this);
		exit.setOnClickListener(this);
	}

	public void onClick(View view) {
		// check which button was clicked with its id
		switch (view.getId()) {
		case R.id.bExit:
			finish();
			break;
		case R.id.bNew:

			Intent game = new Intent(ScoreActivity.this, CubeTestActivity.class); // create
																					// an
																					// Intent
																					// to
																					// launch
																					// the
																					// Game
																					// Activity
			startActivity(game);

		}
	}
}